package com.zh.springcloud.controller;

import com.zh.springcloud.common.Result;
import com.zh.springcloud.service.OrderService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.Service;
import java.util.Map;

/**
 * @Description:
 * @ClassName OrderController
 * @date: 2021.08.12 13:17
 * @Author: zhanghang
 */
@RestController
public class OrderController {

	@Autowired
	private OrderService orderService;

	/**
	 * description: 新建订单
	 * date: 2021年-08月-12日 13:21
	 * author: zhanghang
	 *
	 * @param
	 * @return
	 */
	@PostMapping("/create/order")
	public Result<?> createOrder(@RequestBody Map<String,Object> map){

		return orderService.createOrder(map);
	}

}
